lexicographic algorithm

un. 辞典式算法